package com.wms.service.impl;

import com.wms.mapper.WineMapper;
import com.wms.pojo.Wine;
import com.wms.service.WineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WineServiceImpl implements WineService{

    @Autowired
    private WineMapper wineMapper;

    @Override
    public List<Wine> queryAll() {
        List<Wine> wines = wineMapper.queryAll();
        return wines;
    }

    @Override
    public Wine queryById(Integer id) {
        Wine wine = wineMapper.queryById(id);
        return wine;
    }

    @Override
    public Boolean updateWine(Wine wine) {
        return wineMapper.updateWine(wine);
    }

    @Override
    public Boolean deleteWine(Integer id) {
        return wineMapper.deleteWine(id);
    }

    @Override
    public Boolean addWine(Wine wine) {
        return wineMapper.addWine(wine);
    }
}
